home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / infoplus.zip / PAGE_06.INC < prev    next >
Text File  |  1990-06-25  |  5KB  |  199 lines

  1. procedure page_06;
  2.  
  3. var
  4.   i : byte;
  5.   VGAbuf : array[$00..$10] of byte;
  6.   xbyte : byte;
  7.   xword1 : word;
  8.   xword2 : word;
  9.   xword3 : word;
  10.   xword4 : word;
  11.  
  12. procedure captfont;
  13.  
  14. begin
  15.   caption1('Font           Address');
  16.   writeln;
  17.   write('INT 1FH        ');
  18.   segofs(longint(intvec[$1F]) shr 16, longint(intvec[$1F]) and $0000FFFF);
  19.   writeln
  20. end;
  21.  
  22. procedure showfont(a : byte);
  23.  
  24. begin
  25.   with regs do begin
  26.     case a of
  27.       $00 : write('INT 1FH     ');
  28.       $01 : write('INT 43H     ');
  29.       $02 : write('ROM 8x14    ');
  30.       $03 : write('ROM 8x8 (lo)');
  31.       $04 : write('ROM 8x8 (hi)');
  32.       $05 : write('ROM 9x14    ');
  33.       $06 : write('ROM 8x16    ');
  34.       $07 : write('ROM 9x16    ')
  35.     end;
  36.     write('   ');
  37.     AX:=$1130;
  38.     BH:=a;
  39.     intr($10, regs);
  40.     segofs(ES, BP);
  41.     writeln
  42.   end
  43. end;
  44.  
  45. procedure int101210;
  46.  
  47. begin
  48.   with regs do begin
  49.     AH:=$12;
  50.     BL:=$10;
  51.     intr($10, regs);
  52.     caption2('Display type');
  53.     case BH of
  54.       $00 : writeln('color');
  55.       $01 : writeln('monochrome')
  56.       else
  57.         unknown('display', BH, 2)
  58.     end;
  59.     caption2('Memory');
  60.     case BL of
  61.       $00 : writeln('64K');
  62.       $01 : writeln('128K');
  63.       $02 : writeln('192K');
  64.       $03 : writeln('256K')
  65.       else
  66.         unknown('size', BL, 2)
  67.     end;
  68.     caption2('Feature bits');
  69.     writeln(bin4(CH and $0F));
  70.     caption2('DIP switches');
  71.     writeln(bin4(CL and $0F))
  72.   end
  73. end;
  74.  
  75. begin (* procedure page_06 *)
  76.   caption2('Display adapter');
  77.   case graphdriver of
  78.     CGA : begin
  79.       writeln('CGA');
  80.       captfont
  81.     end;
  82.     MCGA : begin
  83.       writeln('MCGA');
  84.       captfont;
  85.       showfont($01);
  86.       showfont($03);
  87.       showfont($04);
  88.       showfont($06)
  89.     end;
  90.     EGA..EGAmono : begin
  91.       writeln('EGA');
  92.       captfont;
  93.       showfont($01);
  94.       showfont($02);
  95.       showfont($03);
  96.       showfont($04);
  97.       showfont($05);
  98.       int101210;
  99.       xbyte:=mem[BIOSdseg : $0087];
  100.       caption2('Mode change preserves screen buffer');
  101.       yesorno(xbyte and $80 = $80);
  102.       caption2('EGA active');
  103.       yesorno(xbyte and $08 = $00);
  104.       caption2('Wait for display enable');
  105.       yesorno(xbyte and $04 = $04);
  106.       caption2('CGA cursor emulation');
  107.       yesorno(xbyte and $01 = $00);
  108. (*  PC Magazine 6:12 p.326  *)
  109.       caption2('Save area                    ');
  110.       xword1:=memw[BIOSdseg : $00AA];
  111.       xword2:=memw[BIOSdseg : $00A8];
  112.       segofs(xword1, xword2);
  113.       writeln;
  114. (*  PC Tech Journal 3:4 p.65  *)
  115.       caption2('Video parameter table        ');
  116.       segofs(memw[xword1 : xword2 +  2], memw[xword1 : xword2]);
  117.       writeln;
  118.       caption2('Dynamic save area            ');
  119.       xword3:=memw[xword1 : xword2 +  6];
  120.       xword4:=memw[xword1 : xword2 +  4];
  121.       if (xword3 > $0000) or (xword4 > $0000) then begin
  122.         segofs(xword3, xword4);
  123.         writeln
  124.       end else
  125.         writeln('(none)');
  126.       caption2('Auxiliary character generator');
  127.       xword3:=memw[xword1 : xword2 + 10];
  128.       xword4:=memw[xword1 : xword2 +  8];
  129.       if (xword3 > $0000) or (xword4 > $0000) then begin
  130.         segofs(xword3, xword4);
  131.         writeln
  132.       end else
  133.         writeln('(none)');
  134.       caption2('Graphics mode auxiliary table');
  135.       xword3:=memw[xword1 : xword2 + 14];
  136.       xword4:=memw[xword1 : xword2 + 12];
  137.       if (xword3 > $0000) or (xword4 > $0000) then
  138.         segofs(xword3, xword4)
  139.       else
  140.         write('(none)')
  141. (*  PC Tech Journal 3:4 p.67  *)
  142.     end;
  143.     hercmono : begin
  144.       writeln('Hercules or MDA');
  145.       captfont
  146.     end;
  147.     IBM8514 : begin
  148.       writeln('IBM 8514');
  149.       captfont
  150.     end;
  151.     ATT400 : begin
  152.       writeln('AT&T 400');
  153.       captfont
  154.     end;
  155.     VGA : begin
  156.       writeln('VGA');
  157.       captfont;
  158.       showfont($01);
  159.       showfont($02);
  160.       showfont($03);
  161.       showfont($04);
  162.       showfont($05);
  163.       showfont($06);
  164.       showfont($07);
  165.       int101210;
  166.       with regs do begin
  167.         AX:=$1009;
  168.         ES:=seg(VGAbuf);
  169.         DX:=ofs(VGAbuf);
  170.         intr($10, regs)
  171.       end;
  172.       caption2('Palette registers');
  173.       for i:=$00 to $0F do
  174.         write(hex(VGAbuf[i], 2), ' ');
  175.       writeln;
  176.       caption2('Border color');
  177.       writeln(hex(VGAbuf[$10], 2));
  178.       caption2('Color page');
  179.       with regs do begin
  180.         AX:=$101A;
  181.         intr($10, regs);
  182.         writeln('$', hex(BH, 2));
  183.         caption2('Paging mode');
  184.         case BL of
  185.           $00 : writeln('4 pages of 64 registers');
  186.           $01 : writeln('16 pages of 16 registers')
  187.           else
  188.             unknown('mode', BL, 2)
  189.         end
  190.       end
  191.     end;
  192.     PC3270 : begin
  193.       writeln('3270 PC');
  194.       captfont
  195.     end else
  196.       unknown('adapter', graphdriver, 4)
  197.   end
  198. end;
  199.